<?php

namespace App\Http\Controllers;

use App\Http\Service\Impl\LoginImpl;
use App\Models\Manager;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class LoginController extends Controller
{
    private $LoginService;
    public function __construct()
    {
        $this->LoginService = new LoginImpl();
    }

    /**
     * Display a listing of the resource.
     * 显示一个资源的列表
     *
     * @return \Illuminate\Http\Response
     */
    public function login()
    {
        return view("Login.loginPage");
    }

    public function homepage(Request $request)
    {
        //echo $request->input("username");
        return $this->LoginService->login($request);
    }
}
